#region using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
#endregion

namespace MapiApplication
{
    public partial class RenameProfile : Form
    {
        #region Constructors
        public RenameProfile()
        {
        }
        
        public RenameProfile(string selectedProfile)
        {
            InitializeComponent();
            lblExistingProfileCopyProfile.Text = selectedProfile;
        }
        #endregion

        #region Helper Methods
        public string TbxBoxValue
        {
            get { return this.tbxCopyProfileName.Text; }
        }
        #endregion

        #region Event Handlers
        private void RenameProfile_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Close();
            }
        }
        
        private void tbxRenameProfileName_TextChanged(object sender, EventArgs e)
        {
            if (tbxCopyProfileName.Text != null)
            {
                btnOkCopyProfile.Enabled = true;
            }
            else
            {
                btnOkCopyProfile.Enabled = false;
            }
        }
        #endregion
    }
}